package com.yanqu.road.server.timer.platform;

import com.yanqu.road.server.manger.thirdparty.PlatformDataMgr;
import com.yanqu.road.utils.executor.GeneralTask;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class PlatformDataCheckTask extends GeneralTask {

    private Logger logger = LogManager.getLogger(this.getClass().getName());
    private boolean isRun = false;

    @Override
    public void doRun() {
        if(!isRun){
            isRun = true;
            try {
                PlatformDataMgr.recordData();
            }catch (Exception e){
                logger.error("PlatformDataCheckTask error:", e);
            }finally {
                isRun = false;
            }
        }
    }
}
